package fhp.hlhj.giantfold.module

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.javaBean.BaseBean
import fhp.hlhj.giantfold.network.UrlApis

/**
 * author: FHP
 * data: on 2018\1\29 0029 13:34
 * E-Mail: 103945089@qq.com
 */
class BindAliModule {
    interface OnBindAliListener{
        fun showLoading()
        fun onBindListner(baseBean: BaseBean)
    }

    fun bindAli(params: HttpParams,listener: OnBindAliListener){
        UrlApis.bindAli(params)
                .doOnSubscribe {
                    listener.showLoading()
                }
                .subscribe { data->
                    listener.onBindListner(data)
                }
    }
}